package com.nut.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nut.common.BaseEntity;
import lombok.Data;

import java.util.List;

@Data
@TableName("sys_user")
public class SysUser extends BaseEntity {

    private Integer id;

    //pid=0 是主账户  pid=!0 是子账户
    private Integer pid;

    //用户名
    private String username;
    //密码
    private String password;
    //昵称
    private String nickname;
    //手机号
    private String mobile;
    //部门编码
    private String deptCode;

    //邮箱
    private String mail;

    //备注
    private String remark;

    //授权模式 1时间授权，2次数授权，3混合授权
    private Integer authType;

    //授权截止日期
    private String endDate;

    //剩余授权次数
    private Integer remain;

    //总授权次数
    private Integer count;

    //是否拥有词库 1有 0否
    private Integer hasWords;

    // 主账户UserID
    @TableField(exist = false)
    private Integer masterUserId;

    //是否有更新权限 1有 0没有
    private Integer hasUpdate;

    //状态 0正常 1冻结
    private Integer status;

    @TableField(exist = false)
    private List<Integer> roleIds;

}
